//
//  ConfirmInformationTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/13.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "ConfirmInformationTableViewCell.h"

@implementation ConfirmInformationTableViewCell{
    GLGWLabel * companyLabel;
    GLGWLabel * adressLabel;
    GLGWLabel * phoneNumLabel;
    GLGWLabel * contactLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        [bankgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(10));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(10));
        }];
        //
        companyLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(20), KScreenWidth - kHeightProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:bankgroundView];
//        companyLabel.backgroundColor = kRandomColor;
        //
        contactLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(companyLabel.x, kY_With_View(companyLabel, 10), companyLabel.width, companyLabel.height) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:bankgroundView];
//        contactLabel.backgroundColor = kRandomColor;
        
        //
        phoneNumLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(contactLabel.x, kY_With_View(contactLabel, 10), contactLabel.width, contactLabel.height) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:bankgroundView];
//        phoneNumLabel.backgroundColor = kRandomColor;
        
        //
        adressLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(phoneNumLabel.x, kY_With_View(phoneNumLabel, 10), phoneNumLabel.width, phoneNumLabel.height) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:bankgroundView];
//        adressLabel.backgroundColor = kRandomColor;
        
    }
    return self;
}

-(void)setPur_model:(PurchareModel *)pur_model{
    _pur_model = pur_model;
    _pur_model.address = @"北京市大兴区天河路2号，国储库西区";
    companyLabel.attributedText = [GLGWLabel bllChangeStr:[NSString stringWithFormat:@"公司名称    %@",koString(_pur_model.companyName)] changewithStr:@"公司名称" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
    //
    contactLabel.attributedText = [GLGWLabel bllChangeStr:[NSString stringWithFormat:@"联系人      %@",koString(_pur_model.contacts)] changewithStr:@"联系人" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
    //
    phoneNumLabel.attributedText = [GLGWLabel bllChangeStr:[NSString stringWithFormat:@"联系方式  %@",koString(_pur_model.contactPhone)] changewithStr:@"联系方式" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
    //
    adressLabel.attributedText = [GLGWLabel bllChangeStr:[NSString stringWithFormat:@"收货地址  %@",koString(_pur_model.address)] changewithStr:@"收货地址" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
